<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>冒泡排序(sort())</title>
	</head>
	<body>
		<script>
			var arr = [12,34,,-2,-89,99];
			arr.sort();
			alert(arr);
		</script>
	</body>
</html>
